import { axios } from '@/utils/request'

const api = {
  driverLicense: '/shifts/driverinfo'
}

export function getDriverLicenseList (parameter) {
  return axios({
    url: api.driverLicense + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveDriverLicense (parameter) {
  return axios({
    url: api.driverLicense + (parameter.driFlowNo > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delDriverLicense (parameter) {
  return axios({
    url: api.driverLicense + '/remove',
    method: 'post',
    params: parameter
  })
}
// export function getImgLicense (parameter) {
//   return axios({
//     url: api.driverLicense + '/upload',
//     method: 'post',
//     params: parameter

//   })
// }

export const driverLicenseExport = api.driverLicense + '/export'
